package com.friendsoft.crm.service.impl;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.WebService;

import com.friendsoft.crm.bean.UserBean;
import com.friendsoft.crm.entity.User;
import com.friendsoft.crm.exception.NoEntityFoundException;
import com.friendsoft.crm.service.IUserService;

@Stateless
@WebService(endpointInterface="com.friendsoft.crm.service.IUserService")
public class UserService implements IUserService{
	@EJB
	UserBean userBean ;
	
	@Override
	public User createUser(User user) {
		return userBean.createUser(user);
	}

	@Override
	public User updateUser(User user) throws NoEntityFoundException {
		return userBean.updateUser(user);
	}

	@Override
	public User findUserById(long id) {
		return userBean.find(id) ;
	}

	@Override
	public User deleteUserById(long id) throws NoEntityFoundException {
		return userBean.deleteUserById(id) ;
	}
	
	
}
